import request from '@/utils/request'

// 查询学生解除处分申请列表
export function listRelieve(query) {
  return request({
    url: '/routine/relieve/list',
    method: 'get',
    params: query
  })
}

// 查询学生解除处分申请列表
export function getStuList(query) {
  return request({
    url: '/routine/relieve/getStuList',
    method: 'get',
    params: query
  })
}

// 查询学生解除处分申请详细
export function getRelieve(relieveId) {
  return request({
    url: '/routine/relieve/' + relieveId,
    method: 'get'
  })
}

// 新增学生解除处分申请
export function addRelieve(data) {
  return request({
    url: '/routine/relieve/add',
    method: 'post',
    data: data
  })
}

// 新增学生解除处分申请
export function save(data) {
  return request({
    url: '/routine/relieve/save',
    method: 'post',
    data: data
  })
}

// 修改学生解除处分申请
export function updateRelieve(data) {
  return request({
    url: '/routine/relieve/update',
    method: 'post',
    data: data
  })
}

// 删除学生解除处分申请
export function delRelieve(relieveId) {
  return request({
    url: '/routine/relieve/' + relieveId,
    method: 'post'
  })
}

// 获取学生信息
export function getStuInfo(stuNo) {
  return request({
    url: '/routine/disciplinaryApplication/getStuInfo/'+stuNo,
    method: 'get'
  })
}


// 获取学生信息
export function getMyStuInfo() {
  return request({
    url: '/routine/disciplinaryApplication/getMyStuInfo',
    method: 'get'
  })
}

// 获取处分相关信息
export function getPenaltyNumber(penaltyNumber) {
  return request({
    url: '/routine/relieve/getPenaltyNumber/'+penaltyNumber,
    method: 'get'
  })
}

// 根据流程id查询学生请假申请详细
export function getStuDisciplinaryRelieveByProcInsId(procInsId) {
  return request({
    url: '/routine/relieve/getStuDisciplinaryRelieveByProcInsId/' + procInsId,
    method: 'get'
  })
}
